#ifndef STIPPLE_MASK_H
#define STIPPLE_MASK_H

enum StippleMask { 
STIPPLE_MASK_EMPTY,
STIPPLE_MASK_FILL,
STIPPLE_MASK_YACIF1,
STIPPLE_MASK_YACIF2,
STIPPLE_MASK_YACIF3,
STIPPLE_MASK_YACIF4,
STIPPLE_MASK_YACIF5,
STIPPLE_MASK_YACIF6,
STIPPLE_MASK_CROSS,
STIPPLE_MASK_HALFTONE,
STIPPLE_MASK_DIAGONAL_DOWN,
STIPPLE_MASK_DIAGONAL_UP,
STIPPLE_MASK_CHESS,
STIPPLE_MASK_DIAGONAL_UP_2,
STIPPLE_MASK_DOT,
STIPPLE_MASK_CROSS2,

STIPPLE_MASK_NUM_MASKS
};

const GLubyte STIPPLE_MASKS[ STIPPLE_MASK_NUM_MASKS ][4*32] = {

{	// Empty
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0 },

{	// Fill, no stipple
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255,
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255, 
255, 	255, 	255, 	255 },

{	// Yacif Texture 1
192, 	192, 	192, 	192, 
64, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12, 
192, 	192, 	192, 	192, 
192, 	192, 	192, 	192, 
12, 	12, 	12, 	12, 
12, 	12, 	12, 	12 },

{ // Yacif Texture 2
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
240, 	240, 	240, 	240, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	15, 
15, 	240, 	0, 	0, 
15, 	240, 	0, 	0, 
15, 	240, 	0, 	0, 
15, 	240, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
15, 	255, 	255, 	15, 
15, 	255, 	255, 	15, 
15, 	255, 	255, 	15, 
15, 	255, 	255, 	15, 
15, 	255, 	255, 	15, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	15, 
15, 	15, 	15, 	0, 
15, 	15, 	15, 	0, 
15, 	15, 	15, 	0, 
15, 	15, 	15, 	0 },

{ // Yacif Texture 3			
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
0, 	123, 	0, 	123, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0, 
123, 	0, 	123, 	0 },

{	// Yacif Texture 4 (not implemented yet)
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1, 
1, 	1, 	1, 	1 },

{	// Yacif Texture 5
0, 	0, 	0, 	0, 
128, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240, 
255, 	15, 	255, 	240 },

{	// Yacif Texture 6
0, 	0, 	255, 	240, 
0, 	0, 	255, 	240, 
0, 	0, 	255, 	240, 
0, 	0, 	255, 	240, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0, 
0, 	0, 	0, 	0 },

{ // Cross			
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187, 
85, 	85, 	85, 	85, 
238, 	238, 	238, 	238, 
85, 	85, 	85, 	85, 
187, 	187, 	187, 	187 },

{ // Halftone
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170,
85,     85,     85,     85,
170,    170,    170,    170 },

{ // Diagonal Down
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68, 
34, 	34, 	34, 	34, 
17, 	17, 	17, 	17, 
136, 	136, 	136, 	136, 
68, 	68, 	68, 	68 },

{ // Diagonal Up
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34, 
68, 	68, 	68, 	68, 
136, 	136, 	136, 	136, 
17, 	17, 	17, 	17, 
34, 	34, 	34, 	34 },

{ // Chess	
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102, 
153, 	153, 	153, 	153, 
153, 	153, 	153, 	153, 
102, 	102, 	102, 	102, 
102, 	102, 	102, 	102 },

{			
64, 	64, 	64, 	64, 
128, 	128, 	128, 	128, 
1, 	1, 	1, 	1, 
2, 	2, 	2, 	2, 
4, 	4, 	4, 	4, 
8, 	8, 	8, 	8, 
16, 	16, 	16, 	16, 
32, 	32, 	32, 	32, 
64, 	64, 	64, 	64, 
128, 	128, 	128, 	128, 
1, 	1, 	1, 	1, 
2, 	2, 	2, 	2, 
4, 	4, 	4, 	4, 
8, 	8, 	8, 	8, 
16, 	16, 	16, 	16, 
32, 	32, 	32, 	32, 
64, 	64, 	64, 	64, 
128, 	128, 	128, 	128, 
1, 	1, 	1, 	1, 
2, 	2, 	2, 	2, 
4, 	4, 	4, 	4, 
8, 	8, 	8, 	8, 
16, 	16, 	16, 	16, 
32, 	32, 	32, 	32, 
64, 	64, 	64, 	64, 
128, 	128, 	128, 	128, 
1, 	1, 	1, 	1, 
2, 	2, 	2, 	2, 
4, 	4, 	4, 	4, 
8, 	8, 	8, 	8, 
16, 	16, 	16, 	16, 
32, 	32, 	32, 	32 },

{			
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68, 
0, 	0, 	0, 	0, 
17, 	17, 	17, 	17, 
0, 	0, 	0, 	0, 
68, 	68, 	68, 	68 },

{			
128, 	0, 	0, 	1, 
64, 	0, 	0, 	2, 
32, 	0, 	0, 	4, 
16, 	0, 	0, 	8, 
8, 	0, 	0, 	16, 
4, 	0, 	0, 	32, 
2, 	0, 	0, 	64, 
1, 	0, 	0, 	128, 
0, 	128, 	1, 	0, 
0, 	64, 	2, 	0, 
0, 	32, 	4, 	0, 
0, 	16, 	8, 	0, 
0, 	8, 	16, 	0, 
0, 	4, 	32, 	0, 
0, 	2, 	64, 	0, 
0, 	1, 	128, 	0, 
0, 	1, 	128, 	0, 
0, 	2, 	64, 	0, 
0, 	4, 	32, 	0, 
0, 	8, 	16, 	0, 
0, 	16, 	8, 	0, 
0, 	32, 	4, 	0, 
0, 	64, 	2, 	0, 
0, 	128, 	1, 	0, 
1, 	0, 	0, 	128, 
2, 	0, 	0, 	64, 
4, 	0, 	0, 	32, 
8, 	0, 	0, 	16, 
16, 	0, 	0, 	8, 
32, 	0, 	0, 	4, 
64, 	0, 	0, 	2, 
128, 	0, 	0, 	1 }

};

#endif